<template>
  <div>
    <NC v-if="!nc_ids.length" @select="selectNC" />

    <div>------</div>
    <ODS v-if="nc_ids.length && !ods_ids.length" :nc_ids="nc_ids" @select="selectOds" />

    <div>------</div>
    <Ods2So v-if="ods_ids.length" :ods_ids="ods_ids" @button-click="ods2so_button_click" />

    <div>------</div>
    <SO ref="refSO" :so_ids="so_ids" />

    <!-- 
   


    -->
  </div>
</template>

<script>
import api from '@/odoorpc'
import NC from './nc.vue'
import ODS from './ods.vue'
import Ods2So from './ods2so.vue'
import SO from './so.vue'
export default {
  name: 'Web',
  components: { NC, ODS, Ods2So, SO },
  mixins: [],

  data() {
    return {
      nc_ids: [],
      ods_ids: [],
      so_ids: []
    }
  },

  computed: {},

  watch: {},

  async created() {},

  mounted() {},

  methods: {
    selectNC(ids) {
      this.nc_ids = ids
    },

    selectOds(ids) {
      this.ods_ids = ids
    },

    ods2so_button_click(so_ids) {
      this.so_ids = so_ids
      this.$refs.refSO.get_so(so_ids)
    }
  }
}
</script>

<style type="text/css"></style>
